<template>
  <div class="input-content">
    <div class="input-label"><span v-if="props.required" style="color:red;">*</span>{{caption}}</div>
    <div class="input-el-content">
      <el-input-number
        v-model="inputValue"
        v-bind="props"
        :controls-position="controls_position"
        :placeholder="placeholder"
        @change="handleChange"
      />
    </div>
  </div>
</template>

<script>
import { defineComponent } from "vue";
// 引入表单子控件的管理类
import formItemManage from "../controlManage/formItemManage";
// 引入组件需要的属性
import { baseFormProps, numberProps } from "../formItemMeta.js";

export default defineComponent({
  name: "el-form-number",
  props: {
    ...baseFormProps,
    ...numberProps,
  },
  emits: ["myChange", "input", "change", "blur", "focus"],
  setup(props, context) {
    console.log(props);
    return {
      ...formItemManage(props, context),
    };
  },
});
</script>
<style scoped>
@import url('./emap-form-item.css');
</style>